package com.han.dao.abstraction.product;

import java.sql.SQLException;
import java.util.ArrayList;
import javax.naming.NamingException;
import com.han.bom.Question;

public interface GenericQuestionDAO {
	public ArrayList<Question> retrieveAllQuestions() throws SQLException,
			ClassNotFoundException, NamingException;

	public Question retrieveQuestionById(String questionid)
			throws SQLException, ClassNotFoundException, NamingException;

	public ArrayList<Question> retrieveQuestionsbyExam(String examid)
			throws SQLException, ClassNotFoundException, NamingException;

	public ArrayList<String> retrieveCategoriesbyExam(String examid)
			throws SQLException, ClassNotFoundException, NamingException;

	public ArrayList<Question> retrieveQuestionsbyKeyword(String key)
			throws SQLException, ClassNotFoundException, NamingException;

	public boolean insertQuestion(Question question) throws SQLException,
			ClassNotFoundException, NamingException;

	public boolean updateQuestion(Question question) throws SQLException,
			ClassNotFoundException, NamingException;

	public boolean addQuestionToExam(String questionID, String examid)
			throws ClassNotFoundException, SQLException, NamingException;

	public boolean removeAllQuestionsFromExam(String examid)
			throws ClassNotFoundException, SQLException, NamingException;

	public int retrieveMaxQuestionID() throws ClassNotFoundException,
			SQLException, NamingException;
}
